from django.shortcuts import render
from rest_framework.generics import ListAPIView
from home.serializer import BannerModelSerializer,NavModelSerializer
from home.models import Banner,Nav


class BannerAPIView(ListAPIView):
    queryset = Banner.objects.filter(is_show=True, is_delete=False).order_by("orders")
    serializer_class = BannerModelSerializer

class NavAPIView(ListAPIView):
    queryset = Nav.objects.filter(is_show=True, is_delete=False).order_by("orders")
    serializer_class = NavModelSerializer